package asteroids.model.programs.parsing.expressions;


public abstract class ComparisonExpression extends BinaryExpression {

	protected ComparisonExpression(E e1, E e2) {
		super(e1, e2);
		if(!canHaveAsComparisonExpression(e1)){
			setExpression(null, null);
		}
		if(!canHaveAsComparisonExpression(e2)){
			setExpression(null, null);
		}
	}
	public boolean canHaveAsComparisonExpression(E e){
		return (e.isDouble() || e.isString());	
	}
	public boolean isBoolean(){
		return true;
	}
	public boolean isDouble(){
		return false;
	}
	public boolean isEntity(){
		return false;
	}
	public boolean isString(){
		return false;
	}
}
